﻿
//新增
var fnCustomAdd = function () {
    window.parent.$("#tabs").tabs('close', '发票申请单');
    var pagetitle = "发票申请单";
    parent._employeeTitle = pagetitle;
    //parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&flag=0&entity=" + const_EditEntity + ""));
    parent.addTabs(pagetitle, '../Crm/BasePages/StartWorkflow.aspx?title=' + encodeURI(pagetitle) + '&flag=0&entity=' + const_EditEntity + '&WorktaskId=484ed701-4f04-4ff5-a1a4-b888169f4658&WorkflowId=640a02cd-7f36-4c23-b348-9b1958ecd50b');
    parent.NeedRefreshPage = this;
}
//流程节点
//var fnCustomDelete = function () {
//    var recordID = myDataTable.getSelectedRows()[0];
//    record = myDataTable.getRecord(recordID);
//    var vid = record.getData("ID");
//    if (vid != "") {
//        window.parent.$("#tabs").tabs('close', '发票申请单--');
//        var pagetitle = "发票申请单--";
//        parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&flag=1&id=" + vid + "&entity=" + const_EditEntity + ""));
//        parent.NeedRefreshPage = this;
//    }
//}
//双击
function CustomDbClick() {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var vid = record.getData("ID");
    if (vid != "") {
        window.parent.$("#tabs").tabs('close', '查看发票申请单');
        var pagetitle = "查看发票申请单";
        parent._employeeTitle = pagetitle;
        parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&flag=2&id=" + vid + "&entity=" + const_EditEntity + ""));
        parent.NeedRefreshPage = this;
    }
}
//修改
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var vid = record.getData("ID");
    if (vid != "") {
        window.parent.$("#tabs").tabs('close', '修改发票申请单');
        var pagetitle = "修改发票申请单";
        parent._employeeTitle = pagetitle;
        parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&flag=3&id=" + vid + "&entity=" + const_EditEntity + ""));
        parent.NeedRefreshPage = this;
    }
}
